package edu.udel.mboch.towerdefense;

public class PlayerSellMove implements TDMove
{
	private static final long serialVersionUID = 392723289777890168L;
	private Tower tower;

	public PlayerSellMove(Tower tower)
	{
		this.tower = tower;
	}
	
	public boolean isValid(TDState state)
	{
		return state.getGrid().getTowers()[tower.getPosition().y()][tower.getPosition().x()] == tower;
			
	}

	public void make(TDState state)
	{
		state.getGrid().removeTower(tower);
	}

}
